

nir=1000;
nit=100;
xxx=zeros(nit,1);
yyy=zeros(nir/2,1);
zzz=zeros(nir/2,1);
m1=zeros(nit,1);
m2=zeros(nit,1);

num=zeros(nir,nit);
num(:,:)=randn(nir,nit);

for it=1:nit
   xxx(it,1)=mean(3+4*(num(:,it)));
   m1(it,1)=xxx(it,1);
end

for it=1:nit
   yyy(:,1)=num(1:nir/2,it);
   zzz=-yyy;
   xxx=[yyy;zzz];
   m2(it,1)=mean(3+4*(xxx));
end

mm1=mean(m1);
mm2=mean(m2);
   